package com.zzyy.dtx.coupon.controller;

import com.zzyy.dtx.coupon.dto.CouponDTO;
import com.zzyy.dtx.coupon.service.CouponService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @auther zzyy
 * @create 2021-04-20 15:47
 */
@RestController
@Slf4j
public class CouponController
{
    @Resource
    private CouponService couponService;

    @RequestMapping(value = "/coupon/decrease")
    public String decrease(@RequestBody CouponDTO couponDTO)
    {
        log.info("------进入优惠卷controller");
        this.couponService.decrease(couponDTO);
        return "优惠卷 OK";
    }
}
